home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6637 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: moreinfo.com!usenet
  2. From: "J.R. Stoner" <jstoner@isi.com>
  3. Newsgroups: comp.lang.c
  4. Subject: C constant expression declarations
  5. Date: Wed, 14 Feb 1996 18:15:17 -0800
  6. Organization: Heironamous Botch's Murk Works
  7. Message-ID: <31229735.41C67EA6@isi.com>
  8. NNTP-Posting-Host: dakota.isi.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0b6a (X11; I; SunOS 4.1.4 sun4c)
  13.  
  14. This is a query (I have checked the FAQ) into something that strikes me
  15. as a dumbfoundedly stupid issue, but I will ask it anyway :)
  16.  
  17. Normally, I will do things such as:
  18.  
  19.  #define EXPR1   1
  20.  #define EXPR2   2
  21.  
  22. ...and so on.  Lately, I have been observing in code from other people
  23. equivalent declarations such as:
  24.  
  25.  #define EXPR1   (1)
  26.  #define EXPR2   (2)
  27.  
  28. I have seen in the FAQ the business of declaring varargs macros that
  29. are invoked with something like:
  30.  
  31.  DEBUG(("This is a printf string\n"))
  32.  
  33. ...but it does not seem relevant here.
  34.  
  35. Is there, in fact, a reason for putting parens around "simple" constant
  36. expressions?  A reason that did not exist previously?
  37. -- 
  38. J.R. Stoner, Ferroequinologist - jstoner@isi.com
  39.